package com.TanNgee;

import com.TanNgee.config.RpcServiceConfig;
import com.TanNgee.proxy.RpcClientProxy;
import com.TanNgee.remoting.transport.RpcRequestTransport;
import com.TanNgee.remoting.transport.socket.SocketRpcClient;

/**
 * @author 陈毅
 * @create 2022/3/23 15:53
 */
public class SocketClientMain {
    public static void main(String[] args) {
        RpcRequestTransport rpcRequestTransport = new SocketRpcClient();
        RpcServiceConfig rpcServiceConfig = new RpcServiceConfig();

        RpcClientProxy rpcClientProxy = new RpcClientProxy(rpcRequestTransport, rpcServiceConfig);

        HelloService helloService = rpcClientProxy.getProxy(HelloService.class);


        String hello = helloService.hello(new Hello("1010", "Socket, Socket"));

        System.out.println(hello);
    }
}
